package com.example.liyuehui.dsldemo;

import org.gradle.api.NamedDomainObjectFactory;
import org.gradle.internal.reflect.Instantiator;

/**
 * Created by LiYueHui on 2017/11/19.
 */

public class SmallExtensionFactory implements NamedDomainObjectFactory<SmallExtension> {

    private Instantiator instantiator;

    public SmallExtensionFactory(Instantiator instantiator) {
        this.instantiator = instantiator;
    }
    @Override
    public SmallExtension create(String name) {
        return instantiator.newInstance(SmallExtension.class, name);
    }
}
